package vn.orderonline.core.dao.entity;

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "RESTAURANT_MENU_FOOD")
public class RestaurantMenuFood implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private RestaurantMenuFoodId id;
	private Date createTime;
	
	public RestaurantMenuFood() {
		
	}
	
	public RestaurantMenuFood(RestaurantMenuFoodId id) {
		this.id = id;
	}

	@EmbeddedId
	@AttributeOverrides({
		@AttributeOverride(name = "restaurantId", column = @Column(name = "RESTAURANT_ID")),
		@AttributeOverride(name = "menuFoodId", column = @Column(name = "MENU_FOOD_ID")) })
	public RestaurantMenuFoodId getRestaurantMenuFoodId() {
		return id;
	}

	public void setRestaurantMenuFoodId(RestaurantMenuFoodId id) {
		this.id = id;
	}

	@Column(name = "CREATE_TIME", nullable = false)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
}
